<div class="header">
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-home"></i>首页</a></li>
        <li><a href="#">全景图</a></li>
        <li class="active" id="banner">电子沙盘</li>
    </ol>
</div>
<div class="row">
    <div  id="getId" class="col-lg-2 col-xs-2 col-md-2" style="height: 800px;   ">
        <div class="tabT">
            <!--<span style="height: 30px;line-height: 30px;padding-left: 10px ">全景图</span>-->
            <ul id="tab" class="tab">
                <li id="tabId1" class="current" onclick="tab('tabId1','Page/Panorama/map/map.html','电子沙盘');">&nbsp;<i class="fa fa-map-marker"></i>&nbsp;&nbsp;电子沙盘</li>
                <li id="tabId2" onclick="tab('tabId2','Page/Panorama/shopstatic/shopstatic.html','店铺统计');"><i class="fa fa-shopping-cart"></i>&nbsp;&nbsp;店铺统计</li>
                <li id="tabId3" onclick="tab('tabId3','Page/Panorama/customstatic/customstatic.html','自定义统计');"><i class="fa fa-signal "></i>&nbsp;&nbsp;自定义统计</li>
            </ul>
        </div>

    </div>
    <div class="col-lg-10 col-xs-10 col-md-10">
        <div class="show" style="background-color:rgba(0,0,0,0) ;" id="tabC">电子沙盘
        </div>
        <!--<div class="hidden" id="tabC2">店铺统计-->
        <!--</div>-->
        <!--<div class="hidden" id="tabC3">自定义统计-->
        <!--</div>-->
    </div>
</div>
<script type="text/javascript" language="javascript">
    $(function () {
        setMenu();
        GLOBAL.MODULEURL='Page/Panorama/index.html';
        $("#tabC").load("Page/Panorama/map/map.html");
    });
    // $("#tabC1").load("Page/Panorama/map/map.html");
    // $("#tabC2").load("Page/Panorama/shopstatic/shopstatic.html");
    // $("#tabC3").load("Page/Panorama/customstatic/customstatic.html");
    function tab(tabId, url,info,count){
        $("#banner").html(info);
        var len =document.getElementById('getId').getElementsByTagName('li').length;
        for(i=1; i <= len; i++){
            if ("tabId"+i==tabId){
                document.getElementById(tabId).className="current";
                if(i>1){
                    $("#tabC").load(url,function () {
                        setChartDiv(count);
                        setCharts(info);
                    });
                }else{
                    $("#tabC").load(url);
                }
            }else{
                document.getElementById("tabId"+i).className="";
            }
            // if ("tabC"+i==tabC){
            //     document.getElementById(tabC).className="show";
            // }else{
            //     document.getElementById("tabC"+i).className="hidden";
            // }
        }
    }
    //处理菜单
    function setMenu() {
        var liststr="";
        liststr+='<li id="tabId1" class="current" onclick=tab("tabId1","Page/Panorama/map/map.html","电子沙盘");>&nbsp;<i class="fa fa-map-marker"></i>&nbsp;&nbsp;电子沙盘</li>';
        //liststr+='<li id="tabId2" onclick=tab("tabId2","Page/Panorama/shopstatic/shopstatic.html","店铺统计");><i class="fa fa-shopping-cart"></i>&nbsp;&nbsp;店铺统计</li>';
        //加载统计
        var json = {
                url: GLOBAL.URL + "/chartinfo/queryChartGroup",
                type: 'Post',
                data:{"type":"diagram"},
                successfn: function (data) {
                    if(data!=null) {
                        for (var i = 0; i < data.list.length; i++) {
                            liststr += '<li id="tabId' + (2 + i) + '" onclick=tab("tabId' + (2 + i) + '","Page/Panorama/customstatic/customstatic.html","' + data.list[i].groupName + '",' + data.list[i].counts + ');><i class="fa fa-tasks"></i>&nbsp;&nbsp;' + data.list[i].groupName + '</li>';
                        }
                    }
                },
                errorfn: function () {
                    //ajaxUpdataTable();
                    //$.ligerDialog.warn("系统繁忙，请稍候再试");
                }
            };
            ajaxdata(json);
        $("#tab").html(liststr);
    }
</script>